summaryrefslogtreecommitdiff
path: root/src/pages/sitemap/products/[page].js
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-11-13 10:38:49 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-11-13 10:38:49 +0000
commit4e24ad6def0e8df890b72f2f7f877424d8ed84cc (patch)
tree3f11401901f5439fb25ea351346ec14ee622fa26 /src/pages/sitemap/products/[page].js
parent9cbbe5e12f97af023e2f53e4add4c5e5fd9b4667 (diff)
parent48c1110541a30bb33726a6f46737615b98f1d9c5 (diff)
Merged in fix_indexing_google (pull request #470)
<MIqdad>Fix indexing google
Diffstat (limited to 'src/pages/sitemap/products/[page].js')
-rw-r--r--src/pages/sitemap/products/[page].js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pages/sitemap/products/[page].js b/src/pages/sitemap/products/[page].js
index 421c08e3..3603d64c 100644
--- a/src/pages/sitemap/products/[page].js
+++ b/src/pages/sitemap/products/[page].js
@@ -10,9 +10,9 @@ export async function getServerSideProps({ query, res }) {
const queries = {
limit,
page: page.replace('.xml', ''),
- '-publish_b': false,
- product_rating_f: '[8 TO *]',
- price_tier1_v2_f: '[1 TO *]',
+ // '-publish_b': false,
+ // product_rating_f: '[8 TO *]',
+ // price_tier1_v2_f: '[1 TO *]',
};
const products = await productSearchApi({ query: _.toQuery(queries) });
const sitemap = create('urlset', { encoding: 'utf-8' }).att(
@@ -20,12 +20,12 @@ export async function getServerSideProps({ query, res }) {
'http://www.sitemaps.org/schemas/sitemap/0.9'
);
- // const date = new Date()
- const date = '2025-10-30';
+ const date = new Date();
+ // const date = '2025-10-30';
products.response.products.forEach((product) => {
const url = sitemap.ele('url');
url.ele('loc', createSlug(baseUrl, product.name, product.id));
- url.ele('lastmod', date);
+ url.ele('lastmod', date.toISOString().slice(0, 10));
url.ele('changefreq', 'daily');
url.ele('priority', '0.8');
});